﻿<MudDialog>
    <DialogContent>
        <MudText>@ContentText</MudText>
    </DialogContent>
    <DialogActions>
        <MudButton OnClick="Cancel" title="@ConstantString.Cancel">@ConstantString.Cancel</MudButton>
        <MudButton OnClick="Submit" title="@ConstantString.Confirm">@ConstantString.Confirm</MudButton>
    </DialogActions>
</MudDialog>


@code
{
    [CascadingParameter] private IMudDialogInstance MudDialog { get; set; } = default!;

    [Parameter] public string? ContentText { get; set; }

    private void Submit()
    {
        MudDialog.Close(DialogResult.Ok(true));
    }

    private void Cancel()
    {
        MudDialog.Cancel();
    }
}